package com.muse.designpatterns.adapter;

/**
 * 适配器
 */
public class Adapter implements Target{

    private Adaptee adaptee;

    public Adapter(Adaptee adaptee) {
        this.adaptee = adaptee;
    }

    @Override
    public void prepare() {
        adaptee.prepare1();
        adaptee.prepare2();
        adaptee.prepare3();
    }

    @Override
    public void execute() {
        adaptee.doSomething();
    }
}
